Lost update: Two transactions update a row of data at the same time, the last transaction update will overwrite the first transaction update, resulting in the first transaction update data loss, which is caused by no lock;
1. Dirty reads: Dirty reading means that when a transaction is accessing the data and the data has been modified, and the modification has not been submitted to the database, another transaction accesses the data and then uses the data.e.g.The original salary for 1.Mary was 1
Dirty Read, Phantom Read, and non-repeatable READ + transaction ISOLATION level
1. Dirty read: Dirty read refers to when a transaction is accessing the data, and the data has been modified, and this modification has not been committed to the database, then another transac
Tags: presence IDT does not appear height made Zab repeated modificationsI. Isolation levels and phenomena There are 4 levels of database isolation Read uncomitted, unauthorized reading Read Committed, authorized to read REPEATABLE Read, repeatable reading Serializable, serialization There are 3 types of inconsistenci
Tags: count set InnoDB Department CTI hard disk redo log independently completedThere are four transaction isolation levels for Mysqlinnodb: ( default is repeatable read REPEATABLE read) UNCOMMITTED Read Uncommit : The data was modified in another transaction but not yet committed, and in this transaction the SELECT statement may query for these uncommitted data
1. Physics reading (physical read)
When the data block is first read, it will be cached in the buffer cache, while the second read and modify the data block in memory buffer cache The following is an example:
1.1 First read:
C:\Documents and Settings\paul yi>sqlplus "/as sysdba"
Sql*plus:release 9.2.0.4.0-production on
Read behavior is a condition that can be encountered when multiple transactions are executing concurrently, while reading data. Understanding them first helps you understand the meaning of each isolation level. These include dirty reads, non-repeatable reads, and Phantom reads.Dirty read:Dirty read also known as invalid data readout, refers to in the database access, transaction T1 a value modification, and
Isolation level of a database transactionThere are 4 isolation levels for database transactions, from low to high, READ UNCOMMITTED,Read Committed,Repeatable read, andSerializable, which can be resolved individually by each of the four levels Problems such as dirty reading, non-repetition reading, and Phantom reading. 1. READ
MySQL InnoDB Transaction isolation level dirty read, Repeatable read, phantom read
MySQL InnoDB transactions are isolated at four levels. The default value is repeatable read ).
· READUNCOMMITTED ). Another transaction modifies the data but has not yet committed it, And the SELECT statement in this transaction reads th
Main content:1. Initial file operation2. Read-only (R,RB)3. Write only (W,WB)4. Append (A, AB)5. Read and write (r+)6. Write-read (w+)7. Additional write read (A +)8. Other methods of operation9. File modification and another way to open a file handleA. Operation of the initial fileusing Python to
I. DATABASE TRANSACTION ISOLATION LEVELThere are 4 isolation levels for database transactions, from low to high, READ UNCOMMITTED,Read Committed,Repeatable read, andSerializable, which can be resolved individually by each of the four levels Problems such as dirty reading, non-repetition reading, and Phantom reading. √: May appear x: does not appear
Database transaction isolation level and dirty read, phantom read, non-repeated read, transaction level
I. database transaction isolation level
There are four database transaction isolation levels, from low to high: Read uncommitted, Read committed, Repeatable
I. Database transaction ISOLATION LEVEL
There are 4 isolation levels for database transactions, from low to high to read uncommitted, Read committed, Repeatable read, and Serializable, which can solve the problems of dirty reading, non-repeatable reading, and Phantom reading one by one.
√: May appear x: does not appear
Dirty
1. Some problematic reads in the transaction: dirty read, non-repeatable read, Phantom readThe dirty read (Dirty Read) transaction T1 updated the contents of a row of records, but did not commit the changes. The transaction T2 reads the updated row, and then T1 performs the rollback operation, canceling the modificatio
Dirty read (dirty read) unrepeatable read (phantom problem) Parsing1. Dirty read
First, distinguish between dirty pages and dirty data
Dirty pages are modified pages in the memory buffer pool. They are not flushed to the hard disk in time, but are already written to the redo log. It is normal to
Label:form of SQL Server data store
Pre-read: Use the estimated information to go to the hard disk to read the data to the cache. Pre-read 100 times, which is estimated to read 100 pages of data from the hard disk to the cache.
Physical reads: After the query plan is generated, if the cache is missing the
Ext: http://blog.csdn.net/fatherican/article/details/44966921
1, Dirty Read
One transaction reads another transaction, and the pending modification is dirty read. Here's the so-called modification, in addition to the update operation, do not forget, but also includeInsert and delete operations.
Consequences of dirty reading: If the latter transaction is rolled back, all changes made to it will be revoked.
4 attributes of a database transaction:Atomicity (atomic): both succeed or fail;Consistency (consistency): After a transaction operation, the database is in the same state as the business rules; for example, after the A,b account transfers, the total amount remains unchanged;Isolation (Isolation): transactions in operations do not affect each other;Persistence (Durability): After a transaction is committed, it is persisted to the database.
Dirty read,
Issues arising from transaction concurrency:Dirty reads: One transaction reads data that is not committed by another transactionTransaction 1: Updating a single piece of dataTransaction 2: Read record of transaction 1 updateTransaction 1: Commit commits are calledAt this point, the data read by transaction 2 is data stored in database memory, called dirty reads.The data
1. Dirty read : Dirty read refers to when a transaction is accessing the data, and the data has been modified, and this modification has not been committed to the database, then another transaction also accesses the data, and then used this data.
2. Non-repeatable reads : Refers to the same data that is read multiple times within a transaction. When this transact
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.